package com.nycreativity.elecreativity.service;

import com.baomidou.mybatisplus.core.metadata.IPage
import com.baomidou.mybatisplus.extension.service.IService;
import com.nycreativity.elecreativity.entity.dto.GoodsSpecificationDTO
import com.nycreativity.elecreativity.entity.param.goods.GoodsAddParam
import com.nycreativity.elecreativity.entity.param.goods.GoodsQueryParam
import com.nycreativity.elecreativity.entity.param.goods.GoodsSpecificationUpdateParam
import com.nycreativity.elecreativity.entity.param.goods.GoodsUpdateParam
import com.nycreativity.elecreativity.entity.po.Goods
import com.nycreativity.elecreativity.entity.vo.goods.GoodsVO
import com.nycreativity.elecreativity.entity.vo.goods.SkuOfGoodsVO

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-03-22
 */
interface GoodsService : IService<Goods> {

    /**
     * 根据id查询
     */
    fun queryById(id: Long): GoodsVO

    /**
     * 查询全部
     */
    fun queryAll(): List<GoodsVO>

    /**
     * 根据条件分页查找
     */
    fun queryPage(goodsQueryParam: GoodsQueryParam): IPage<GoodsVO>

    /**
     * 新增商品
     */
    fun add(goodsAddParam: GoodsAddParam): Boolean

    /**
     * 根据id修改商品
     */
    fun updateById(goodsUpdateParam: GoodsUpdateParam): Boolean

    /**
     * 根据id删除
     */
    fun deleteById(id: Long): Boolean

    /**
     * 根据id更新规格
     */
    fun updateSpecificationById(goodsSpecificationUpdateParam: GoodsSpecificationUpdateParam)

}
